#ifndef DM_MOTOR_H
#define DM_MOTOR_H

#include <stdint.h>
#include "motor_def.h"

typedef enum
{
    MOTOR_MIT = 0x01,
    MOTOR_ONE_TO_FOUR = 0x02,
} DM_Data_Motor_Mode_e;

#pragma pack(1)
typedef struct
{
    uint16_t ecd;
    uint16_t last_ecd;
    float    single_round_angle;
    float    total_angle;
    float    speed;
    int16_t  current;
    uint8_t  temperature;
    int32_t  total_round;
} One_To_Four_DM_Motor_Measure_s;

typedef struct 
{

} MIt_DM_Motor_Measure_s;
#pragma pack()

typedef struct
{
    DM_Data_Motor_Mode_e mode;
    union 
    {
        One_To_Four_DM_Motor_Measure_s A_data;
        MIt_DM_Motor_Measure_s B_data;
    } measure;
} DMMotorInstance;
#endif
